package TestedClasses;

/**
 * Created with IntelliJ IDEA.
 * MyUser: belict
 * Date: 11/28/13
 * Time: 12:32 PM
 * To change this template use File | Settings | File Templates.
 */
public class Money {
    private final int amount;
    private final String currency;

    public Money(int amount, String currency) {
        this.amount = amount;
        this.currency = currency;
    }

    public int getAmount() {
        return amount;
    }

    public String getCurrency() {
        return currency;
    }

    public boolean equals(Object anObject){
        if(anObject instanceof Money){
            Money money = (Money)anObject;
            return money.getCurrency().equals(getCurrency())
                    && getAmount() == money.getAmount();
        }

        return false;
    }

    public static void main(String[] args) {
        StringBuilder h = new StringBuilder("hello");
        h.replace(0,1,"s");
        System.out.println(h);
    }
}
